<?php echo $header; ?><?php echo $column_left; ?>
		<!-- Right Column -->				
		<div class="d4-col-right right">
			<?php echo $menu_content;?>

			<div class="padder"></div>

			<div class="category-head">
				<h2>Đăng kí thành viên</h2>
			</div>
			
		<div class="hp-report">
										
			<!-- <ul class="messages"><li class="success-msg"><ul><li>Thông báo nè.</li></ul></li></ul> -->
			<?php if(isset($error_warning) && $error_warning != ""){?><ul class="messages"><li class="error-msg"><ul><li><?php echo $error_warning;?></li></ul></li></ul><?php }?>
			<form id="form-validate" method="post" action="<?php echo $register_link;?>">
				<fieldset class="group-select wide" >
				<input type="hidden" value="" name="success_url">
				<input type="hidden" value="" name="error_url">
					<div class="head-alt2">
						<h4 class="title">Thông Tin Tài Khoản</h4>
					</div>
					<table style="border:1px solid #d9dde3; " cellspacing="0" class="data-table box-table shopping-cart" id="shopping-cart-table">
					
							<tbody>
								<tr class="first last odd">
									<td style="text-align:right;">
										<span>Email<span class="required">*</span></span>
									</td>
									<td>
										<span><input type="text" size="80px;" class="required-entry input-text" value="<?php echo $email; ?>" name="email"></span>
										<?php if ($error_email) { ?>
											<br />
              								<span class="error"><?php echo $error_email; ?></span>
              							<?php } ?>
									</td>
											
								</tr>
								<tr class="first last odd">
									<td style="text-align:right;">
										<span>Mật khẩu <span class="required">*</span></span>
									</td>
									<td>
										<span><input size="80px;" type="password" class="required-entry input-text" name="password" value="<?php echo $password; ?>"></span>
										<?php if ($error_password) { ?>
              								<br /><span class="error"><?php echo $error_password; ?></span>
              							<?php } ?>
									</td>
											
								</tr>
								<tr class="first last odd">
									<td style="text-align:right;">
										<span>Nhập lại Mật khẩu <span class="required">*</span></span>
									</td>
									<td>
										<span><input size="80px;" type="password" class="required-entry input-text" name="confirm" value="<?php echo $confirm; ?>" ></span>
									    <?php if ($error_confirm) { ?>
              								<br /><span class="error"><?php echo $error_confirm; ?></span>
              							<?php } ?>
									</td>
											
								</tr>
								
						</tbody>
					</table>
					
				</fieldset>
				<br>
				<fieldset class="group-select wide" >
					<div class="head-alt2">
						<h4 class="title">Thông Tin Cá Nhân</h4>
					</div>
					<table style="border:1px solid #d9dde3; " cellspacing="0" class="data-table box-table shopping-cart" id="shopping-cart-table">
					
							<tbody>
								<tr class="first last odd">
									<td width="150px" style="text-align:right;">
										<span>Họ Tên <span class="required">*</span></span>									
									</td>
									<td>
										<span><input type="text" size="80px;" class="required-entry input-text" name="name" value="<?php echo $name; ?>" ></span>
										<?php if ($error_name) { ?>
              								<br /><span class="error"><?php echo $error_name; ?></span>
              							<?php } ?>
									</td>
											
								</tr>
								<tr class="first last odd">
									<td style="text-align:right;">
										<span>Giới Tính <span class="required">*</span></span>
									</td>
									<td>
										<span><input type="radio" value="1" name="sex" <?php if(isset($sex) && ($sex == 1 || $sex == -1)){echo "checked";}?>>&nbsp;Nam &nbsp;
										<input type="radio" value="0" name="sex" <?php if(isset($sex) && ($sex == 0)){echo "checked";}?>>&nbsp;Nữ </span>
									</td>
											
								</tr>
								<tr class="first last odd">
									<td style="text-align:right;">
										<span>Ngày sinh nhật <span class="required">*</span></span>
									</td>
									<td>
										<span>
										<select style="float:left" name="birthday">
											<option value="0">- Ngày- </option>
											<?php for($i = 1; $i < 32 ;$i++){?>
												<?php if(isset($birthday) && $birthday == $i ){?>
													<option value="<?php echo $i;?>" SELECTED ><?php echo $i;?></option>
												<?php }else{?>
													<option value="<?php echo $i;?>"><?php echo $i;?></option>
												<?php }?>
											<?php }?>
										</select> 
										<select style="float:left" name="birthmonth">										
											<option value="0">- Tháng - </option>
											<?php for($i = 1; $i < 13 ;$i++){?>
												<?php if(isset($birthmonth) && $birthmonth == $i ){?>
													<option value="<?php echo $i;?>" SELECTED ><?php echo $i;?></option>
												<?php }else{?>
													<option value="<?php echo $i;?>"><?php echo $i;?></option>
												<?php }?>
											<?php }?>
										</select> 
										<select style="float:left" name="birthyear">
											<option value="0">- Năm - </option>
											<?php $year = date("Y");?>
											<?php for($i = $year - 100; $i < $year ;$i++){?>
												<?php if(isset($birthyear) && $birthyear == $i ){?>
													<option value="<?php echo $i;?>" SELECTED ><?php echo $i;?></option>
												<?php }else{?>
													<option value="<?php echo $i;?>"><?php echo $i;?></option>
												<?php }?>
											<?php }?>											
										</select>
										</span>
										
										<?php if ($error_birth) { ?>
              								<span class="error">&nbsp;&nbsp;<?php echo $error_birth; ?></span>
              							<?php } ?>										
									</td>
											
								</tr>
								<tr class="first last odd">
									<td style="text-align:right;">
										<span>Số điện thoại <span class="required"></span></span>
									</td>
									<td>
										<span><input type="text" size="80px;" class="required-entry input-text" name="telephone" value="<?php echo $telephone; ?>" onkeypress="return numbersonly(this, event);" maxlength="12"></span>
									</td>
											
								</tr>
								<tr class="first last odd">
									<td style="text-align:right;">
										<span>Số di động  <span class="required"></span></span>
									</td>
									<td>
										<span><input type="text" size="80px;" class="required-entry input-text" name="mobile" value="<?php echo $mobile; ?>" onkeypress="return numbersonly(this, event);" maxlength="12"></span>
									</td>
											
								</tr>
								<tr class="first last odd">
									<td style="text-align:right;">
										<span>Địa chỉ <span class="required"></span></span>
									</td>
									<td>
										<textarea style="width:350px;" name="address"><?php echo $address; ?></textarea>
									</td>
											
								</tr>
								
						</tbody>
					</table>
					
				</fieldset>
				<br>
				<fieldset class="group-select wide">
					<div class="head-alt2">
						<h4 class="title">Mã Số An Toàn</h4>
					</div>
					<table style="border:1px solid #d9dde3; " cellspacing="0" class="data-table box-table shopping-cart" id="shopping-cart-table">
					
							<tbody>
								<tr class="first last odd">
									<td width="150px" style="text-align:right;vertical-align:middle;">
										<span>Mã Số An Toàn <span class="required">*</span></span>
									</td>
									<td >
										<span><input style="margin-top:8px;" type="text" size="40px;" maxlength="6" class="required-entry input-text" name="captcha" value="" autocomplete="off" >
										<img title="captcha" alt="captcha" src="index.php?route=account/create/captcha" align="middle">
										</span>
										<?php if ($error_captcha) { ?>
              								<br /> <span class="error"><?php echo $error_captcha; ?></span>
              							<?php } ?>
									</td>
											
								</tr>
								
						</tbody>
					</table>
				</fieldset>
				<div  class="button-set">
					<p style="float:left;margin-left:20px;"class="required">* Bắt buộc</p>
					<input style="float:left;margin-left:20px;" type="image" alt="Submit"  src="catalog/view/theme/default/images/btn_submit.gif">
				</div>
			</form>
		</div>
    </div>
  </div>
<script type="text/javascript">
<!--
function numbersonly(myfield, e)
{
var key;
var keychar;
if (window.event)
key = window.event.keyCode;
else if (e)
key = e.which;
else
return true;
keychar = String.fromCharCode(key);
// control keys
if ((key==null) || (key==0) || (key==8) ||
(key==9) || (key==27) || (key==13) )
return true;
// numbers
else if ((("0123456789").indexOf(keychar) > -1))
return true;
// decimal point jump
else
return false;
}
//-->
</script>  
<?php echo $footer; ?> 